<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class BlackAccessLog extends Model
{
    protected $fillable = ['app_id', 'channel_id', 'source_type', 'from_url', 'access_date', 'black_refer_id', "visitor_ip", "source_device_type"];

    public function userApp() {
        return $this->hasOne(UserApp::class, "id", "app_id");
    }

    public function appChannel() {
        return $this->hasOne(AppChannel::class, "id", "channel_id");
    }

    public function blackRefer() {
        return $this->hasOne(ReferBlackUrl::class, "id", "black_refer_id");
    }
}
